package com.coreJava.test02;

import java.util.ArrayList;
import java.util.List;

/**
 * 作者: LCG
 * 日期: 2019/9/3 10:42
 * 描述:
 */
public class Test0303 {

    public static void main(String[] args) throws InterruptedException {

        List<Integer> list=new ArrayList<>();

        MyRunable myRunable=new MyRunable(list);
        Thread thread=new Thread(myRunable);

        MyRunable myRunable2=new MyRunable(list);
        Thread thread2=new Thread(myRunable2);

        thread.start();
        thread.join();

        thread2.start();
        thread2.join();


        System.out.println(list.size());


    }

}
